import {Card, Col, Row} from "antd";
import Meta from "antd/es/card/Meta";
import {useNavigate} from "react-router-dom";
import ProductCategoryCard from "../../components/ProductComponent/ProductCategoryCard";

const SubCategory = ({ data }) => {

    if (!Array.isArray(data)) {
        return null;
    }

    return (
        <div style={{
            display:"flex",
            flexWrap:"wrap",
            columnGap:"60px",
            rowGap:"50px",
            marginLeft:"40px",
            marginTop:"30px"
        }}>
            {data.map((item,index) => (
                <ProductCategoryCard  key={index} item={item} />
            ))}
        </div>
    );
};
export default SubCategory;